package name.marz.to.go.ahg.core.responsehandler;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

import name.marz.to.go.ahg.common.util.LogUtil;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.ResponseHandler;
import org.apache.http.util.EntityUtils;

public class NopResponseHandler implements ResponseHandler<Object> {
	private static final Logger log = Logger.getLogger(NopResponseHandler.class.getName());
	
	public NopResponseHandler() {
	}
	
	@Override
	public Object handleResponse(HttpResponse response) throws ClientProtocolException, IOException {
		log.info(response.getStatusLine().toString());
		LogUtil.log(Level.FINE, response.getAllHeaders(),"response header");
		EntityUtils.consume(response.getEntity());
		return null;
	}
}
